package com.jman.front.clients;

import com.jman.front.dto.Message;
import com.jman.front.dto.MessageDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient("messageservice")
public interface MessageClient {
    @PostMapping("/message/save")
    String saveMessage(@RequestBody MessageDTO messageDTO);

    @GetMapping("/message/getInfo")
    List<Message> getMessageInfo();

    @DeleteMapping("/message/delInfo")
    Boolean deleteById(@RequestParam Integer id);
}
